function decode_x = decode(x,num_initial, num_vari, len_vari, upper_bound, lower_bound)
num = 2.0^len_vari;
decode_x = zeros(num_initial, num_vari);
for i = 1 : num_initial
    for j = 1 : num_vari
        tmp = 0.0;
        m = 1;
        for k = 1 : len_vari
            tmp = tmp + x(i, j, len_vari + 1 - k) * m;
            m = m * 2;
        end
        decode_x(i, j) = (upper_bound - lower_bound) * (tmp / num) + lower_bound;
    end
end
end